load("//tools/build_defs/android:fb_xplat_android_cxx_library.bzl", "fb_xplat_android_cxx_library")
load("//tools/build_defs/oss:profilo_defs.bzl", "profilo_path")

fb_xplat_android_cxx_library(
    name = "counters",
    srcs = [
        "ProcFs.cpp",
        "SysFs.cpp",
    ],
    header_namespace = "profilo/counters",
    exported_headers = [
        "BaseStatFile.h",
        "Counter.h",
        "ProcFs.h",
        "SysFs.h",
    ],
    compiler_flags = [
        "-fexceptions",
        "-frtti",
        "-fPIC",
        "-std=gnu++14",
        "-DLOG_TAG=\"Profilo/counters\"",
        "-O3",
    ],
    labels = [],
    soname = "libprofilo_counters.$(ext)",
    tests = [
        profilo_path("cpp/test/counters:counter"),
        profilo_path("cpp/test/counters:procfs"),
    ],
    visibility = [
        "PUBLIC",
    ],
    deps = [
        profilo_path("cpp/logger/buffer:buffer"),
        profilo_path("cpp/util:util"),
        profilo_path("cpp:profilo"),
        profilo_path("deps/fb:fb"),
    ],
    exported_deps = [
        profilo_path("cpp/logger:multi_buffer_logger"),
    ],
)
